Doing Jenkins Like A Hacker
Exploring Jenkins
Jenkins was one of the most
popular CI tools used to build and test different kinds of projects. It's now
also used for CD and being the very important part in DevOps practices.
Firstly, we need to
understand what CI is. CI is one of the most popular application development
practices in recent times. Developers integrate new feature, bug fixes in a
code repository. Then CI tool verifies automatically build and test to detect
any problem with current sources and provide quick feedback to development
team.

"Jenkins is an open source automation server written in Java. Jenkins
helps to automate the non-human part of the software developmentprocess, with continuous integration and
facilitating technical aspects of continuous delivery. It is a
server-based system that runs in servlet containers such
as Apache Tomcat – Wikipedia
Jenkins plugins
Plugins make Jenkins more easy to learn,
easy to use. There are various categories of plugins avaiable
for Jenkins, such as:
Source code management
Slave launchers and controllers
Build triggers
Build tools
Build notifiers
Build report
Post build actions
UI plugins
Library plugins
In this article, I'm using Laravel
project with Git repo and Java e2e automation test
for example build. So there is should-have plugins:
1.
Jenkins Pipeline plugin
2.
SonarQube
3.
Github
Integration plugin
4.
Allure Jenkins Plugin
5. Default
suggestion plugin from Jenkins
Pipeline as code concept
The default interaction
model with Jenkins, historically, has been very web UI driven, requiring users
to manually create jobs, then manually fill in the details through a web
browser. This requires additional effort to create and manage jobs to test and
build multiple projects, it also keeps the configuration of a job to
build/test/deploy separate from the actual code being built/tested/deployed.
This prevents users from applying their existing CI/CD best practices to the
job configurations themselves.
With Jenkins pipeline
plugin as I listed in should-have plugins, users can implement a project's
entire build-test-deploy pipeline in a Jenkinsfile
and store that alongside their code.
Building
on the core Jenkins value of extensibility, Pipeline is also extensible both by
users with Pipeline Shared Libraries and
by plugin developers.
The
flowchart below is an example of one CD scenario easily modeled in Jenkins
Pipeline: